From: Florian Zwoch Date: Wed, 7 Feb 2018 09:31:33 +0000 (+0000) Subject: shell-recorder: save cursor's image hot x/y coordinates X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~994^2^2~57 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6f0c187cf4c3a96298470e591c7bb991b2a37cbf;p=gnome-shell.git shell-recorder: save cursor's image hot x/y coordinates Whenever a new cursor image is loaded also save it's hot x/y coordinates. The drawing code already respects these values, however they were never set. This change will place the cursor image at the correct location as seen on screen. shell-screenshot.c served as reference. https://bugzilla.gnome.org/show_bug.cgi?id=792860 --- diff --git a/src/shell-recorder.c b/src/shell-recorder.c index 6205703a7..03b9d8253 100644 --- a/src/shell-recorder.c +++ b/src/shell-recorder.c @@ -325,6 +325,9 @@ recorder_fetch_cursor_image (ShellRecorder *recorder) if (!texture) return; + meta_cursor_tracker_get_hot (recorder->cursor_tracker, + &recorder->cursor_hot_x, &recorder->cursor_hot_y); + width = cogl_texture_get_width (texture); height = cogl_texture_get_height (texture); stride = 4 * width;